package com.lemobar.pay.model.alipay.response;

import lombok.Data;

/**
 * 支付宝 统一收单交易创建接口 的响应
 * alipay.trade.page.pay
 * 统一的 https://docs.open.alipay.com/api_1/alipay.trade.create
 */
@Data
public class AliPayTradeCreateResponse {
    /*
    响应示例
        {
            "alipay_trade_create_response": {
                "code": "10000",
                "msg": "Success",
                "out_trade_no": "20150423001001",
                "trade_no": "2015042321001004720200028594"
            },
            "sign": "ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE"
        }
     */

    private AliPayTradeCreateResponse.Content alipayTradeCreateResponse;

    /**
     * 签名,详见文档  https://doc.open.alipay.com/docs/doc.htm?treeId=291&articleId=106074&docType=1
     */
    private String sign;


    @Data
    public static class Content {
        /**
         * 网关返回码,详见文档 https://doc.open.alipay.com/docs/doc.htm?treeId=291&articleId=105806&docType=1
         */
        private String code;

        /**
         * 网关返回码描述,详见文档 https://doc.open.alipay.com/docs/doc.htm?treeId=291&articleId=105806&docType=1
         */
        private String msg;

        /**
         * 业务返回码，参见具体的API接口文档
         */
        private String subCode;

        /**
         * 业务返回码描述，参见具体的API接口文档
         */
        private String subMsg;

        /**
         * 商家订单号
         */
        private String outTradeNo;

        /**
         * 支付宝交易号
         */
        private String tradeNo;

    }

}
